/***************************************************
 @Name :        小铭同学
 @Time :        2025-09-03
 @Email :       LiaoMingWJ233@163.com
 @Comment :     震动马达 控制
 @FileName :    vibratordevice.cpp
 @Version :     1.0
****************************************************/


#include "vibratordevice.h"

VibratorDevice::VibratorDevice(QObject *parent) : QObject(parent)
{
    vibrator_init();
}

void VibratorDevice::VibratorTurn(int frequency){
    int ret = vibrator_on(frequency);
    if(ret < 0)
    {
        qDebug()<<"error: turn on faile";
    }
}

VibratorDevice::~VibratorDevice(){
    vibrator_close();
}

